<#include "../../select.ftl" />
<!DOCTYPE html>
<html>
<head>
    <title>制度文档</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8"/>
    <link rel="icon" type="image/ico" href="${absoluteContextPath}/images/favicon.ico"/>
    <!-- Bootstrap -->
    <link href="${absoluteContextPath}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${absoluteContextPath}/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="${absoluteContextPath}/js/nestable/css/style.css">
    <link rel="stylesheet" href="${absoluteContextPath}/css/chosen.min.css">
    <link rel="stylesheet" href="${absoluteContextPath}/css/chosen-bootstrap.css">
    <link href="${absoluteContextPath}/css/minoral.css" rel="stylesheet">
    <link href="${absoluteContextPath}/css/bootstrap-select.css" rel="stylesheet">
    <link href="${absoluteContextPath}/css/fullcalendar.css" rel="stylesheet">
    <!-- JS -->
    <script src="${absoluteContextPath}/js/jquery.js"></script>
    <script src="${absoluteContextPath}/js/jquery-migrate-1.2.1.js"></script>
    <script src="${absoluteContextPath}/js/jquery-ui.js"></script>
    <script src="${absoluteContextPath}/js/bootstrap.min.js"></script>
    <script src="${absoluteContextPath}/js/jquery.nicescroll.min.js"></script>
    <script src="${absoluteContextPath}/js/chosen.jquery.js"></script>
    <script src="${absoluteContextPath}/js/minoral.min.js"></script>
    <script src="${absoluteContextPath}/js/jquery.form.js"></script>
    <script src="${absoluteContextPath}/js/jquery.json-2.4.min.js"></script>
    <script src="${absoluteContextPath}/js/nestable/jquery.nestable.js"></script>
    <script type="text/javascript" src="${absoluteContextPath}/js/My97DatePicker/WdatePicker.js"></script>
    <script src="${absoluteContextPath}/js/bootstrap-select.js"></script>
    <script src="${absoluteContextPath}/js/moment.min.js"></script>
    <script src="${absoluteContextPath}/js/fullcalendar.js"></script>
    <script src="${absoluteContextPath}/js/lang-all.js"></script>
    <script src="${absoluteContextPath}/js/echarts-all.js"></script>
    <script src="${absoluteContextPath}/js/jquery.smartWizard-2.0.min.js"></script>
    <script src="${absoluteContextPath}/js/common.js"></script>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 8]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript">


         function refreshTable() {
            $("input[name=currentPage]").val(1);
            $("#search_upDocument_table").ajaxSubmit({
                url:'${absoluteContextPath}/up/upDocument/udajaxList',
                success:function(data) {
                    var data = JSON.parse(data);
                    if (data.returnCode == 1) {
                        $("#tableContent").html(data.content.data);
                    } else {
                        $.showMessage({parentId:"showMessage",message:"表格数据加载异常！",type:"success"});
                    }
                }
            });
        }

        function downloadDoc(docUrl) {
            $("#fileName").val(docUrl);
            $("#clientFileName").val(docUrl);
            $("#Form_Download").submit();
        }
    </script>
</head>
<body>

<div class="navbar navbar-default " >
    <!-- Branding -->
    <div class="navbar-header col-md-12">
        <img src="${absoluteContextPath}/images/logo.png">
        <img src="${absoluteContextPath}/images/top-img.png" style="margin-left:10px;">
        <span class="logo-text" style="font-size:30px;">制度文档中心</span>
    </div>
</div>

<div class="breadcrumbs">

</div>

<div class="main">
    <!-- row -->
    <div class="row">
        <div class="col-md-12">
            <section class="tile">
                <!-- tile body -->
                <div class="tile-body">
                    <div id="showMessage"><#include "../../message.ftl" /></div>
                    <div class="form-horizontal">
                        <form id="search_upDocument_table" action="${absoluteContextPath}/up/upDocument/udlist" method="post">
                            <input type="hidden" name="pageSize" value="${upDocumentsTable.page.pageSize}"/>
                            <input type="hidden" name="currentPage" value="${upDocumentsTable.page.currentPage}"/>



                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">分类</label>
                                    <div class="col-sm-8">
                                    <@select name="spareA" value="${upDocumentParams.spareA!''}" list=sortTypeList class="form-control"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">子分类</label>
                                    <div class="col-sm-8">
                                    <@select name="spareB" value="${upDocumentParams.spareB!''}" list=subcategoryTypeList class="form-control"/>
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">标题</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="subject" value="${upDocumentParams.subject!''}" placeholder="" type="text">
                                    </div>
                                </div>

                            </div>
                            <div class="row">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">内容摘要</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="synopsis" value="${upDocumentParams.synopsis!''}" placeholder="" type="text">
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-4 control-label" for="exampleInputEmail2">文件名称</label>
                                    <div class="col-sm-8">
                                        <input class="form-control" name="docUrl" value="${upDocumentParams.docUrl!''}" placeholder="" type="text">
                                    </div>
                                </div>






                                <div class="form-group col-md-4">
                                    <label class="col-sm-4"></label>
                                    <div class="col-sm-8">
                                        <button type="button" class="btn btn-primary" onclick="refreshTable()">查询</button>
                                        <button type="reset" class="btn btn-default">重置</button>
                                    </div>
                                </div>
                            </div>
                            </form>
                    </div>
                </div>
            </section>
            <section class="tile">

                <div class="tile-body nopadding">
                    <div class="table-responsive" id="tableContent">
                        <#include "table.ftl"/>
                    </div>
                </div>
            </section>
        </div>
    </div>
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    </div>
    <form id="Form_Download" action="${absoluteContextPath}/up/upDocument/downloadDoc"
          method="post"
          style="display: none">
        <input id="fileName" name="fileName" type="hidden" value=""/>
        <!-- 下载潜在客户导入模板 -->
        <input id="clientFileName" name="clientFileName" type="hidden" />
        <!-- 下载潜在客户导入模板 -->
    </form>
</div>

</body>
</html>

